<!DESCRIPTION>This script controls a maximum textarea input amount and updates a small counter with how many characters are left with each keystroke. Dynamic fix now allows you to use this script in multiple textboxes on a page.<!/DESCRIPTION>
<!CATEGORY>Forms<!/CATEGORY>
<!SCRIPT>
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL LIMIT TEXTAREA:
1. Copy code into the HEAD section of document
2. Put last coding into the BODY section of document -->
<!-- STEP ONE: Add code into HEAD section of document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Ronnie T. Moore -->
<!-- Web Site: Evrsoft -->
<!-- Dynamic 'fix' by: Nannette Thacker -->
<!-- Web Site: http://www.shiningstar.net -->
<!-- Begin
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Add code into BODY section of document -->
<BODY>
<!-- textCounter() parameters are: text field, the count field, max length -->
<center>
<form name=myform action="YOUR-SCRIPT.CGI">
<font size="1" face="arial, helvetica, sans-serif"> ( You may enter up to 125 characters. )<br>